#pragma once
#include "mesh.h"
#include <vector>
#include "Chest.h"
#include "Warp.h"
#include "NPC.h"
#include "InteractableObject.h"
// Debug graphics header
#include "XAnimator\DebugGraphics.h"

class Player;
// oh god, CYCLIC DEPENDANCIES

class World
{
public:
	World(LPDIRECT3DDEVICE9 device);
	~World(void);
	void Render();
	void LoadPointers(LPDIRECT3DDEVICE9 _device, IXAnimator *XAnim, ChestsS *ChestArray, int* GameStateP, std::string* MessageP, Player* PlayerP);
	void loadMap(int ID);

	D3DXVECTOR3 BoundingBoxes_[50][8]; // yo dawg, i herd you liek vectors
	int numMesh;
	std::vector<Chest> Chests;
	std::vector<Warp> Warps;
	std::vector<NPC> NPCs;
private:
	Mesh terrain;
	Mesh skyBox;
	Mesh collisionMesh;
	LPDIRECT3DDEVICE9	device_;			// Pointer to a rendering device
	IXAnimator *XAnimator_;
	int* GameStateP_;
	std::string* MessageP_;
	ChestsS* ChestArrayP_;
	Player* PlayerP_;
	    /* 8 Corners:
		  y
		  ^
		  6-- ---7
		 /|     /|
		/ |   /  |
		2---z-3  |
		|  4--|--5
		| /   | /
		|/    |/
		0-----1 > x
		so corner 0 is all mins, corner 7 is all max.
	*/
};

